﻿#ifndef CCLIENT_H
#define CCLIENT_H

#include <QObject>
#include <QLocalSocket>
#include <QLocalServer>

class CClient : public QObject
{
    Q_OBJECT

public:
    CClient();
    ~CClient();

public:
    void ConnectToServer(const QString &strServerName);
    void sendMessage(const QString &msg);

private slots:
    void socketConnectedHandler();
    void socketDisConnectedHandler();
    void socketErrorHandler(QLocalSocket::LocalSocketError error);

private:
    QLocalSocket *m_socket;

};

#endif // CCLIENT_H
